# coding=utf-8


# class Demo:
#     def __call__(self):
#         print("我是Demo")
#
# demo=Demo()
# demo()


class MylogDecorator():
    def __init__(self,func):
        self.func=func

    def __call__(self, *args, **kwargs):
        print("日志记录....")
        return self.func(*args,**kwargs)

@MylogDecorator #fun2=MylogDecorator(fun2)
def fun2():
    print("使用功能2：")


if __name__ == '__main__':
    fun2()